package com.hm.security;

import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;

public class SecurityUtilities {

	private UserDetails loggedinUser;
	//private ChmDAO dataService = new ChmDAOImpl();
	
	public SecurityUtilities(){
		loggedinUser= (UserDetails)SecurityContextHolder.getContext().getAuthentication().getPrincipal();
	}
	
	public String getLoggedInUserName(){
		return loggedinUser.getUsername();
	}
	
	
}
